package sample.student;


import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.stage.Stage;

public class Student extends Application {
    String username="Test";
    String password;
    public Student(String u,String p){
        username=u;
        password=p;
    }
    public Student(){

    }
    public  void start(Stage primarystage){
        try{
            FXMLLoader fxLoader = new FXMLLoader(getClass().getResource("/fxml/student.fxml"));
            Parent root = fxLoader.load();
            Scene sc;
            Label name = (Label) root.lookup("#stu_main_lbl_sid");
            name.textProperty().setValue(username);
            sc= new Scene(root,705,446);
            primarystage.setScene(sc);
            primarystage.setResizable(false);
            primarystage.setTitle("学生端");
            primarystage.show();

        }catch (Exception e){
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        launch(args);
    }

}
